class Solution {
public:
    bool isPowerOfTwo(int n) {
        int count = 0;
        int temp = 1;
        for(int i = 1; i < 8 * sizeof(n); i++){
          if(n == temp) return true;
          temp << 1;
        }
        return false;
    }
};
